﻿module dayudict.loader;

private import dwt.all;

public class Loader {

	private Display display;
	private Shell	shell;
	
	/** Load GUI and display a Splashscreen while loading */
	public this(){

		/** Apply application name to Display */
		Display.setAppName("FoxDict");
	
		/** Create a new Display */
		display = Display.getDefault();
		shell = new Shell(display);

    shell.layout();
	}

	public void run(){
    shell.open();
    while (!shell.isDisposed()) {
        if (!display.readAndDispatch())
            display.sleep();
    }
	}
}
